Methods and apparatus for allocating resources in the presence of uncertainty

ABSTRACT

A method of allocating resources in the presence of uncertainty is presented. The method builds upon deterministic methods and initially creates and optimizes scenarios. The invention employs clustering, line-searching, statistical sampling, and unbiased approximation for optimization. Clustering is used to divide the allocation problem into simpler sub-problems, for which determining optimal allocations is simpler and faster. Optimal allocations for sub-problems are used to define spaces for line-searches; line-searches are used for optimizing allocations over ever larger sub-problems. Sampling is used to develop Guiding Beacon Scenarios that are used for generating and evaluating allocations. Optimization is made considering both constraints, and positive and negative ramifications of constraint violations. Applications for capacity planning, organizational resource allocation, and financial optimization are presented.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of non-provisional applicationSer. No. 09/348,889 filed on Jul. 6, 1999, now U.S. Pat. No. 6,219,649.

By reference the following documents, submitted to the Sunnyvale Centerfor Innovation, Invention and Ideas (SCI³) under the US Patent andTrademark Office's Document Disclosure Program, are hereby included:

Copending Pat. Application Ser. No. 09/070,130, filed on Apr. 29, 1998and issued on Feb. 29, 2000 as Pat. No. 6,032,123 is incorporated byreference herein and referred to as PRPA (Prior Relevant Patent). PRPAdisclosed and discusses several methods for allocating resources.

BACKGROUND TECHNICAL FIELD

This invention relates to methods and systems for allocating resourcesin an uncertain environment.

By reference the following documents, submitted to the Sunnyvale Centerfor Innovation, Invention and Ideas (SCI³) under the US Patent andTrademark Office's Document Disclosure Program, are hereby included:

Title Number Date Method of Allocating Resources S00463 Jul. 9, 1997 ina Stochastic Environment Method of Allocating Resources S00730 Mar. 16,1998 in a Stochastic Environment - Further Considerations Method ofAllocating Resources S00743 Apr. 10, 1998 in a Stochastic Environment -Further Considerations II Method of Allocating Resources S00764 May 11,1998 in a Stochastic Environment - Further Considerations III Method ofAllocating Resources S00814 Jul. 24, 1998 in a Stochastic Environment -Further Considerations IV Methods and Apparatus for S00901 Dec. 14, 1998Allocating Resources in an Uncertain Environment - PPA Draft I Methodsand Apparatus for S00905 Dec. 18, 1998 Allocating Resources in anUncertain Environment - PPA Draft II Methods and Apparatus for S00914Jan. 6, 1999 Allocating Resources in an Uncertain Environment - PPADraft III

BACKGROUND OF PRIOR ART

Almost all organizations and individuals are constantly allocatingmaterial, financial, and human resources. Clearly, how best to allocatesuch resources is of prime importance.

Innumerable methods have been developed to allocate resources, but theyusually ignore uncertainty: uncertainty as to whether the resources willbe available; uncertainty as to whether the resources will accomplishwhat is expected; uncertainty as to whether the intended ends proveworthwhile. Arguably, as the increasingly competitive world-marketdevelops, as technological advancements continue, and as civilizationbecomes ever more complex, uncertainty becomes increasingly the mostimportant consideration for all resource allocations.

Known objective methods for allocating resources in the face ofuncertainty can be classified as Detailed-calculation, stochasticprogramming, scenario analysis, and Financial-calculus. (The terms“Detailed-calculation”, “Financial-calculus”, “Simple-scenarioanalysis”, and “Convergent-scenario analysis” are being coined here tohelp categorize prior-art.) (These known objective methods forallocating resources are almost always implemented with the assistanceof a computer.)

In Detailed-calculation, probabilistic results of different resourceallocations are determined, and then an overall best allocation isselected. The first historic instance of Detailed-calculation, which ledto the development of probability theory, was the determination ofgambling-bet payoffs to identify the best bets. A modern example ofDetailed-calculation is U.S. Pat. No. 5,262,956, issued to DeLeeuw andassigned to Inovec, Inc., where yields for different timber cuts areprobabilistically calculated, and the cut with the best probabilisticvalue is selected. The problem with DeLeeuw's method, and this is afrequent problem with all Detailed-calculation, is its requirement toenumerate and evaluate a list of possible resource allocations.Frequently, because of the enormous number of possibilities, suchenumeration and valuation is practically impossible.

Sometimes to allocate resources using Detailed-calculation, a computersimulation is used to evaluate:

Z _(dc) =E(f _(dc)(x _(dc)))  (1.0)

where vector x_(dc) is a resource allocation plan, the function f_(dc)evaluates the allocation in the presence of random, probabilistic, andstochastic events or effects, and E is the mathematical expectationoperator. With such simulation capabilities, alternative resourceallocations can be evaluated and, of those evaluated, the bestidentified. Though there are methods to optimize the function, suchmethods often require significant amounts of computer time and hence arefrequently impractical. (See Michael C. Fu's article “Optimization viaSimulation: A Review,” Annals of Operations Research Vol. 53 (1994), p.199-247 and Georg Ch. Pflug's book Optimization of Stochastic Models:The Interface between Simulation and Optimization, Kluwer AcademicPublishers, Boston, 1996.) (Generally known approximation solutiontechniques for optimizing equation 1.0 include genetic algorithms andresponse surface methods.)

A further problem with Detailed-calculation is the difficulty ofhandling multiple-stage allocations. In such situations, allocations aremade in stages and between stages, random variables are realized (becomemanifest or assume definitive values). A standard solution approach tosuch multiple-stage Detailed-calculation resource allocations is dynamicprogramming where, beginning with the last stage, Detailed-calculationis used to contingently optimize last-stage allocations; thesecontingent last-stage allocations are then used by Detailed-calculationto contingently optimize the next-to-the-last-stage allocations, and soforth. Because dynamic programming builds upon Detailed-calculation, theproblems of Detailed-calculation are exacerbated. Further, dynamicprogramming is frequently difficult to apply.

Stochastic programming is the specialty in operationsresearch/management science (OR/MS) that focuses on extendingdeterministic optimization techniques (e.g., linear programming,non-linear programming, etc.) to consider uncertainty. The generalsolution approach is to construct and solve an optimization model thatincorporates all the possibilities of what could happen. Unless theresulting optimization model is a linear programming model, the usualproblem with such an approach is that the resulting optimization problemis too big to be solved; and aside from size considerations, isfrequently unsolvable by known solution means. Creating a linearprogramming model, on the other hand, frequently requires acceptingserious distortions and simplifications. Usually, using more than twostages in a stochastic programming problem is impractical, because theabove-mentioned computational problems are seriously aggravated.Assumptions, simplifications, and multi-processor-computer techniquesused in special stochastic programming situations fail to serve as ageneral stochastic-programming solution method.

In Simple-scenario analysis, future possible scenarios are created. Theallocations for each are optimized, and then, based upon scenarioprobabilities, a weighted-average allocation is determined. Sometimesthe scenarios and allocations are analyzed and, as a consequence, theweights adjusted. The fundamental problem with this method is that itdoes not consider how the resulting allocation performs against thescenarios, nor does it make any genuine attempt to develop an allocationthat, overall, performs best against all individual scenarios. Relatedto this fundamental problem is the assumption that optimality occurs ata point central to individual scenario optimizations; in other words,that it is necessarily desirable to hedge allocations. Such hedgingcould, for example, lead to sub-optimality when, and if, the PRPA usesSimple-scenario analysis for allocating resources: because of economiesof scale, it could be preferable to allocate large resource quantitiesto only a few uses, rather than allocate small quantities to many uses.Another practical example concerns allocating military warheads, wherehedging can be counter-productive.

Also related to the fundamental problem of scenario analysis is itsinability to accommodate utility functions in general, and vonNeumann-Morgenstern (VNM) utility functions in particular. Arguably,according to economic theory, utility functions should be used for allallocations when uncertainty is present. Loosely, a utility functionmaps outcomes to “happiness.” The VNM utility function, in particular,maps wealth (measured in monetary units) to utility, has a positivefirst derivative, and, usually, has a negative second derivative. Bymaximizing mathematically-expected VNM utility, rather than monetaryunits, preferences concerning risk are explicitly considered.

(A classic example of Simple-scenario analysis theory is Roger J-B.Wets' thesis, “The Aggregation Principle in Scenario Analysis andStochastic Optimization,” in: Algorithms and Model Formulations inMathematical Programming, S. W. Wallace (ed.), Springer-Verlag, Berlin,1989, p. 91-113.)

Simple-scenario analysis has been extended to what might be calledConvergent-scenario analysis, which starts where Simple-scenarioanalysis ends. Using a weighted-average allocation, individual scenariosare re-optimized with their objective functions including penalties (orcosts) for deviating from the average allocation. Afterwards, a newweighted-average allocation is determined, the penalties made moresevere, and the process is repeated until the individual scenarios'optimizations converge to yield the same allocation. The deficiencies ofSimple-scenario analysis as previously described remain, though they aresomewhat mitigated by the mechanism that coordinates individual-scenariooptimizations. The mechanism, however, is contingent upon arbitraryparameter values, and hence the mechanism itself arbitrarily forcesconvergence. Further, such forced convergence is done without regard towhether the current allocation actually improves. Further still, theconvergent mechanism tends to overly weigh scenarios that are highlysensitive to small allocation changes, even though it could be desirableto ignore such scenarios. Incorporating penalties for deviating from theaverage allocation can be cumbersome, if not impossible, and can resultin significantly complicating and protracting the solution procedure.

The Progressive Hedging Algorithm is the most famous of theConvergent-scenario analysis techniques and is described in R. TRockafellar and Roger J.-B. Wets, “Scenarios and Policy Aggregation inOptimization Under Uncertainty” Mathematics of Operations Research Vol.16 (1991), No. 1, p. 119-147. Other Convergent-scenario analysistechniques are described in John M. Mulvey and Andrzej Ruszczynski, “ANew Scenario Decomposition Method for Large-Scale StochasticOptimization,” Operations Research 43 (1995), No. 3, p. 477-490, andsome of the other prior-art references.

U.S. Pat. No. 5,148,365 issued to Dembo is another scenario-analysismethod. Here, as with Simple-scenario analysis, future possiblescenarios are created and the allocations for each are optimized.Afterwards, the scenario allocations and parameters, possibly togetherwith other data and constraints, are combined into a single optimizationproblem, which is solved to obtain a final allocation. Though thismethod mitigates some of the problems with Simple-scenario analysis, theproblems still remain. Most importantly, it does not fully consider howthe resulting allocation performs against all individual scenarios.This, coupled with the disparity between objective functions used foroptimization and actual objectives, results in allocations that are onlyfair, rather than nearly or truly optimal. Because this method sometimesuses a mechanism similar to the convergent mechanism ofConvergent-scenario analysis, the previously discussed convergentmechanism problems can also occur here.

As a generalization, all types of stochastic programming (and scenarioanalysis is a form of stochastic programming) can have the followingserious deficiencies when allocating resources. First, penalties canintroduce distortions. Second, the process of forming tractable modelscan introduce other distortions. Third, existing techniques arefrequently unable to handle discrete quantities. Fourth, constraints arenot fully considered, with the result that constraints are violated withunknown ramifications, and, conversely, other constraints are overlyrespected. Fifth, existing techniques usually presume a single localoptimum, though multiple local optimums can be particularly probable.Sixth, existing techniques can require significant computer time tocompute gradients and derivatives. Seventh, and perhaps most important,practitioners frequently do not use stochastic programming techniques,because shifting from deterministic techniques is too complex.

Theoretical finance, theoretical economics, financial engineering, andrelated disciplines share several methods for allocating and pricingresources in the presence of uncertainty. (Methods for valuing orpricing resources also allocate resources, since once a value or priceis determined, it can be used for resource allocation internally withinan organization and used to decide whether to buy or sell the resourceon the open market.) These methods tend to use mathematical equationsand calculus for optimization. A frequent problem, however, is that oncecomplicating factors are introduced, the solution techniques no longerwork, and either computer-simulation Detailed-calculation orstochastic-programming methods, with their associated problems, arerequired. A further problem is that such methods, in order to bemathematically tractable, frequently ignore VNM utility functions andwork with unrealistically, infinitesimally small quantities and values.

In conclusion, though innumerable methods have been developed todetermine how to allocate resources, they frequently are unable to copewith uncertainty. Attempts to include uncertainty frequently result inmodels that are too big to be solved, unsolvable using known techniques,or inaccurate. As a consequence, resource allocations of bothorganizations and individuals are not as good as they could be. It istherefore a fundamental object of the present invention to obviate ormitigate the above-mentioned deficiencies.

SUMMARY OF THE INVENTION

Accordingly, besides the objects and advantages of the present inventiondescribed elsewhere herein, several objects and advantages of theinvention are to optimally, or near optimally, allocate resources in thepresence of uncertainty. Specifically, by appropriately:

1. considering how the resulting allocation performs against possiblescenarios 2. utilizing von Neumann-Morgenstern or other utilityfunctions 3. hedging and not hedging 4. handling uncertain constraints5. handling discrete-quantity requirements 6. considering multiple localoptimums 7. using and capitalizing on known methods for allocatingresources that ignore, or do not explicitly consider, uncertainty 8.using multiple processors.

Additional objects and advantages will become apparent from aconsideration of the ensuing description and drawings.

The basis for achieving these objects and advantages, which will berigorously defined hereinafter, is accomplished by programming acomputer as disclosed herein, inputting the required data, executing thecomputer program, and then implementing the resulting allocation. Theprogramming steps are shown in the flowchart of FIG. 1.

Step 101 entails generating scenarios and optimizing scenarioallocations. In Step 103, the optimized allocations are grouped intoclusters. In Step 105, first-stage allocations are randomly assigned toscenario nodes and, by using an evaluation and exploration technique tobe described, Guiding Beacon Scenarios (GBSs) are generated. Step 107entails using the GBSs and identifying the allocations within eachcluster that perform best against the scenarios within the cluster. InStep 109, allocations that perform better against the scenarios withineach cluster are created, typically by considering two of the betterallocations, and then using line-search techniques. If there is morethan one cluster, then in Step 113 the clusters are merged into largerclusters and processing returns to Step 109. Once only a single clusterremains and Step 109 is complete, the best allocation thus far obtainedis taken as the final optimal allocation and is implemented in Step 115.

Numerous other advantages and features of the invention will becomereadily apparent from the following detailed description of theinvention and the embodiments thereof, from the claims, and from theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be more readily understood with reference to theaccompanying drawings, wherein:

FIG. 1 shows a high-level flowchart;

FIG. 2 demonstrates optimized-scenario-allocation and cluster usage;

FIGS. 3A, 3B, and 3C demonstrate the three line-search techniques;

FIG. 4A shows an elementary scenario-tree; FIGS. 4A and 4B combined showthe scenario-tree used by the present invention;

FIG. 5 is a skeletal definition of the WNode class;

FIG. 6 is a skeletal definition of the WScenario class;

FIG. 7 is a skeletal definition of the XAlloc class;

FIGS. 8A and 8B are skeletal definitions of the WWMatrix and AAMatrixclasses;

FIG. 9 is a skeletal definition of the EvaluateXAllocAgainstWScenariofunction;

FIG. 10 is a skeletal definition of the DeterministicOptimizer function;

FIG. 11 is a skeletal definition of the ValueAllocation function;

FIG. 12 is a skeletal definition of the ZCluster class; and

FIGS. 13A and 13B show special von Neumann-Morgenstern utilityfunctions.

DETAILED DESCRIPTION OF THE INVENTION Theory of the Invention—Philosophy

The following philosophical assumptions are made:

1. All resource allocations should fundamentally attempt to directly orindirectly optimize one of three things: monetary gain, monetary loss,or what economists term “utility.” 2. There is no such thing as aconstraint violation; for fundamentally any constraint can be violated,though with consequences. These consequences can be quantified andexpressed in the terms of the range of the objective function, providedthat the objective function is cast as a fundamental type. 3. The more aconstraint is violated, the larger the adverse impact on the fundamentalobjective being optimized. 4. The adverse effect of a constraintviolation is always less than infinity. 5. Both objective and subjectiveprobabilities are useful as imperfect estimates of what could happen. 6.Almost every decision is a resource allocation, because almost everydecision directly or indirectly leads to a resource allocation. 7. Everyresource allocation (and decision) would be easier and simpler if therewas no uncertainty.

As an example of the first four items, a business might have a resourceallocation plan that optimizes profits (monetary gain), and among otherthings fulfills the requirement (constraint) that contractualobligations be met. However, it may happen that fulfilling thecontractual obligations becomes impossible. At this point, though theconstraint is violated, it is irrelevant. What is relevant is how bestto handle the contractual obligations: re-negotiating, performingrestitution, fulfilling some of the obligations, etc. Whatever course ischosen, there follows an adverse impact on the business' profits. Themore numerous and onerous the contractual obligations, the larger theadverse impact. However, this adverse impact is always less thaninfinity. There are always degrees of catastrophe: it is better to beshort 10M resource units, rather than 20M; it is better to be insolventby $30M, rather than $50M; etc.

As an example of the fifth item, an objective probability measurementmight be obtained by statistical analysis of responses to a largesurvey, while a subjective value by a guess. Lacking better bases, bothare usable and valuable. (Given a choice between the two, however, theobjective estimate is usually preferable.)

A consequence of the fifth item is a diminishment of the usualdistinction between risk and uncertainty. In common-professional usage,risk suggests known probabilities, while uncertainty suggests unknownprobabilities. Philosophically, however, one always can determine asubjective probability estimate. Hence, here no distinction is madebetween risk and uncertainty; the two words are used interchangeably.

This philosophical section is presented here to facilitate a deeper andbroader understanding of how the present invention can be used. However,neither understanding this section nor agreeing with it are required forimplementing or using this invention. Hence, this section should not beconstrued to bound or in any way limit the present invention.

Theory of the Invention—Mathematical Framework

As is standard in stochastic programming, resources in this inventionare allocated in one or more stages, and, between stages, what werepreviously uncertain values either become known, or the uncertainty oftheir eventual values reduced. Allocations made in one stage affect whatcan be accomplished in subsequent stages. Mathematically, the generalstochastic resource allocation model addressed here is: $\begin{matrix}{{{maximize}\quad z} = {\sum\limits_{i = {{each}\quad {scenario}}}{p_{i} \cdot {f\left( {a_{1},{WS}_{i}} \right)}}}} & (2.0)\end{matrix}$

where,

WS_(i) is a matrix containing all the random-variable realizations forscenario i

a₁ is a vector containing first-stage allocations

ƒ is a function that evaluates first-stage allocations a₁ againstscenario i

p_(i) is the probability of scenario i

Implicit within function ƒ is the generation of a₂, a₃, . . .allocations for the second, third, and so-forth stages. Also implicit isan evaluation of such allocations. (Obviously, the maximizingorientation used here could have just as easily have been reversed.)

The focus here is on determining the optimal vector a₁, since thoseallocations are most immediately relevant, are initially implemented,and are implemented prior to any additional information becomingavailable.

Several strategies are used in tandem to cope with the inherentNP-hardness of stochastic programming: clustering, line-searching,statistical sampling, and unbiased approximation. Clustering is used todivide the allocation problem into simpler sub-problems, for whichdetermining optimal allocations is computationally simpler and faster.Optimal allocations for sub-problems are used to define spaces forline-searches; line-searches are used for optimizing allocations overever larger sub-problems. Sampling is used to develop schemes used togenerate and evaluate allocations, especially for generating, and inturn using, GBSs.

FIGS. 2, 3A, 3B, 3C and 4A demonstrate some basic concepts that weredeveloped as part of this invention: FIG. 2 shows howindividual-scenario optimizations can serve as good starting points forfinding an overall optimal allocation and how clustering can facilitateoptimization; FIGS. 3A, 3B and 3C show the operation of specialline-searching techniques to find better allocations; and FIG. 4A showshow GBSs are generated and used to evaluate a₁ allocations.

FIG. 2 depicts a hypothetical example with four scenarios. The a₁allocations are shown collapsed into a single dimension on thehorizontal axis; the vertical axis shows function ƒ and z values. Curves201, 202, 203, and 204 show ƒ values as a function of a₁ for the first,second, third, and fourth scenarios respectively. The optimal a₁ valuesfor the four scenarios are points 211, 212, 213, and 214. Given the fouroptimal points, they are clustered: points 211 and 212 into a cluster221; points 213 and 214 into a cluster 231. (The clusters include thescenarios themselves.) The value of z across both the first and secondscenarios is shown by curve 230; stated differently, curve 230 shows theprobabilistically-weighted average value of curves 201 and 202. Thevalue of z across the third and fourth scenarios by is shown by curve241. For both clusters, the optimal individual-scenario allocations aregood starting points for finding the optimal cluster allocations.Line-search techniques, to be explained shortly, are used to locate apoint 232 as the optimal allocation for cluster 221. For cluster 231,however, the third scenario's optimal allocation (point 213) is the bestcluster allocation. Now, the iteration repeats: the two clusterallocations points 232 and 213 are clustered into a larger finalcluster. The value of z across the four scenarios is shown by curve 251,and as analogous to using optimized-scenario allocations, the optimalallocations for the individual clusters serve as starting points forfinding the overall optimal allocation, point 261.

FIGS. 3A, 3B, and 3C show the operation of the three line-searchtechniques, each of which approximates function z with parabolas. Thethree techniques build upon one another. As before, the a₁ allocationsare shown collapsed into a single dimension on the horizontal axis; thevertical axis shows function z values. Points 300 and 301 correspond totwo allocations and define the line in the allocation space that issearched. (An allocation is a point in the allocation space, and for themoment the words “allocation” and “point” are used synonymously whenthey apply to the allocation space represented by the horizontal axis.)These two allocations have z values as indicated by points 310 and 311respectively. A parameter h, which can range from negative to positiveinfinity, governs the linear blending of allocations 300 and 301. In thefirst technique, Simple Parabola Search (SPS), a point 302 is selected(See FIG. 3A); the associated value z, point 312, is determined; aparabola through points 310, 312, and 311 is determined (shown asparabola 391); and the optimum domain value of the parabola, point 303,is evaluated for possibly yielding a better z value.

FIG. 3B shows allocation 303 yielding a value indicated by a point 313,which is inferior to point 310. In such a case, the second technique,Inner Compression Search (ICS), builds upon the failed SPS attempt. ICShypothesizes that the z function is roughly like curve 392 (shownpassing through points 310, 314, 313, and 311), with a local optimumnear point 310 and between points 310 and 313. Initially, ICS tests thehypothesis by determining whether an allocation 304, near allocation300, yields a z value better than allocation 300. If so, the point 313of the SPS and the points 310 and 314 are used to determine a parabolaand the optimum domain value of the parabola, point 305, is evaluatedfor yielding a better z value. If a better z value is not obtained, thenthe process repeats: using points 310, 314, and the z-value point forallocation 305, another parabola is determined, and so forth.

If the hypothesis proves incorrect (i.e., allocation 304 yields aninferior z value indicated by a point 324 in FIG. 3C), then the thirdtechnique, Outer Compression Search (OCS), builds upon the failed ICSattempt. Because allocation 300 yields a higher z value than allocation304, OCS presumes that the z function increases as h decreases fromzero. Such is exemplified by curve 393, which passes through points 310,324, and 311. Initially, OCS experiments with increasingly negative hvalues until an inferior allocation is obtained; afterwards, it appliesICS.

FIG. 4A shows an elementary scenario tree, and the generation and use ofGuiding Beacon Scenarios (GBSs). GBSs are applicable when there are morethan two stages. At node 411, the first-stage allocations a₁ are made;at nodes 421 and 422, second-stage allocations a₂ are made; at nodes431, 432, 433, and 434, third-stage allocations a₃ are made; and atnodes 441, 442, 443, 444, 445, 446. 447, and 448, fourth-stageallocations a₄ are made. Here, end-node identifiers are also used todesignate scenarios; it is uncertain whether scenarios 441, 442, 443,444, 445, 446, 447, or 448, will occur. (Vectors w₁, w₂, w₃ assumedifferent realizations of random variables for the eight scenarios.) Toevaluate a first stage a₁ allocation against, for example scenario 441,the first step is to determine the second stage allocations a₂. This isdone by assuming both that a₁ is fixed, and that the GBS of node421—either 441, 442, 443, or 444—will occur with certainty. Given thosetwo assumptions, the allocations of a₂, a₃, and a₄ are re-optimized. Thesecond step follows the first: Assuming that a₁ and a₂ are fixed, andthat the GBS of node 431—either 441 or 442—will occur with certainty, a₃and a₄ are re-optimized. The final step is to re-optimize a₄, holdinga₁, a₂, and a₃ fixed, and assuming scenario 441 occurs with certainty.The value of this final re-optimization is the value of the a₁allocation against scenario 441.

To generate GBSs, initially optimized a₁ allocations are randomlyassigned to the second and third stage nodes. Then, starting with athird stage node, for example node 431, for each assigned a₁ allocation,and for each subsequent node (441 and 442), what are here termed SpanOptimizations are performed: a₂, a₃, and a₄ are re-optimized, holding a₁fixed, and assuming the subsequent-node scenario occurs with certainty.Afterwards, for each Span Optimization, a₄ is re-optimized holding a₁,a₂, and a₃ fixed, and assuming the other subsequent node(s) occur withcertainty. Finally, the Span Optimization that performs best overall isidentified, and its scenario is selected as the GBS. (For example, todetermine the GBS for node 431, a₂, a₃, and a₄ are re-optimized holdinga₁ fixed, and assuming scenario 441 occurs with certainty (SpanOptimization); afterwards, a₄ is re-optimized holding a₁, a₂, and a₃fixed, and assuming scenario 442 occurs with certainty. If the SpanOptimization using scenario 441 performs better against scenarios 441and 442 than the Span Optimization using scenario 442, then the GBS fornode 431 is scenario 441.) The same is subsequently applied to the otherthird stage nodes. The GBSs for the second stage nodes are generatedsimilarly, though the third-stage GBSs are assumed to occur withcertainty.

FIGS. 2, 3A, 3B, 3C, and 4A, and this mathematical approach section arehere to facilitate understanding, and should not be construed to defineor bound the present invention.

Embodiment

While the invention is susceptible to embodiments in many differentforms, there are shown in the drawings and will be described herein, indetail, the preferred embodiments of the present invention. It should beunderstood, however, that the present disclosure is to be considered anexemplification of the principles of the invention and is not intendedto limit the spirit or scope of the invention and/or claims of theembodiments illustrated.

The basic embodiment of the present invention will be discussed first.Afterwards, the preferred embodiment with its extensions of the basicembodiment, will be presented.

Here, an Object Oriented Programming (OOP) orientation is used.Pseudo-code syntax is loosely based on C++, includes expository text,and covers only the particulars of this invention. Well-known standardsupporting functionality is not discussed or shown. Class names beginwith a special capital letter that helps distinguish a class from theconcept represented by the class. Variable names for class instancesbegin with a lower case letter and always include the class name.Data-types are usually implicit. Variables with suffix “Cntn” areinstances of a general pointer-container class, whose elements can befetched in a loop mechanism or referenced using an “[]” operator. Thesequence in which objects are fetched from instances of the generalpointer-container class is assumed to be constant; in order words,assuming the instance contains the same pointers, then every loopmechanism will always fetch the pointers in the same sequence, andsimilarly, the “[]” operator, with the same argument, will also fetchthe same pointer. Variable voa (value of allocation), which is used inboth classes and functions, contains the value of an optimizedallocation or an aggregation of such values. Vectors and arrays start atelement 0, which is frequently not used, so that element 1 correspondsto stage 1. Indentation is used to indicate a body of code or a linecontinuation. All variables (including matrixes and vectors) are passedto functions by reference. From now on, the term “optimize” (andcognates) may mean the application of formal mathematical techniquesthat yield global or local optimizations, but it also includes theapplication of any type of heuristic or rule-based decision-makingprocedure that would be expected to make or improve an allocation.

FIGS. 4A and 4B joined together show the general scenario tree usedhere. There are nStage allocations stages, a₁ through a_(nStage), anda_(nStage) is equal to, or greater than, two. Allocations may or may notbe needed for the last stage; however, to facilitate exposition, laststage allocations are presumed required and are always addressed. Thoughthe figure shows two nodes following most nodes, any number of nodes canfollow all-but-the-last-stage nodes. Each last-stage node has a pointerto a wScenario object, which contains scenario particulars. The wvectors contain different realizations of the random variables.

FIG. 5 shows a skeletal definition of the WNode class. The firstelement, pGBS, is a pointer to a wScenario object that serves as theGBS. This element is applicable for the second through the last-stagenodes. For last-stage nodes, pWScenario is applicable, and points to awScenario object, which defines a scenario. For the second through thenext-to-the-last-stage nodes, xAllocRndCntn contains xAlloc objects,which in turn contain a₁ vectors, used for generating GBSs. Data membernodeProbability is the probability of reaching the node, given that theimmediately preceding node has been reached. This class has a voamember. For all but the last-stage nodes, nextWNodeCntn containssubsequent nodes.

The skeletal definition of the WScenario class is shown in FIG. 6. Thefirst element, wwMatrix, is a WWMatrix object, which is defined belowand contains w vectors. The second element, pWNode, is a vector ofpointers pointing to the wNodes that the scenario passes through. Theprobability of the scenario's occurrence is stored in nativeProbability.The function NativeOptimizer optimizes a₁, a₂, . . . , a_(nStage)allocations, assuming the scenario defined in wwMatrix occurs withcertainty. The resulting a₁ vector is stored in nativeXAlloc.

Class XAlloc is a wrapper for a₁ vectors and is shown in FIG. 7.Variable feasible is a Boolean indicating whether vector a₁ is feasible;member variable h, which is not always used, is the value that was usedto combine two a₁ vectors to yield the instance's a₁ vector. Membervariable voa is the standard voa variable. This class also has anassignment operator to copy a₁ vectors and h scalars between instancesand a comparison operator to compare the a₁ vectors of differentinstances. Comparisons between a₁ elements are done with a tolerance.

FIGS. 8A and 8B show class definitions of WWMatrix and AAMatrix, whichrespectively hold, as column-matrixes, vectors w and a corresponding toa complete scenario. The 0th column of both matrixes is not used so thatcolumns correspond to stages: e.g., vector w₃ is stored in columnww[][3]; vector a₄ is stored in column aa[][4]. All elements of vectorsw and a, and in turn arrays ww and aa, hold any data or function typerequired to define scenarios and specify allocations. All vector andmatrix elements are not necessarily used, and no relationship orcommonality necessarily exists between the elements in the same row ofww (or aa). Both classes have h and voa members, as previouslydescribed.

FIG. 9 outlines the EvaluateXAllocAgainstWScenario function, which isthe pseudo-code implementation of the previously mentioned function ƒ inequation 2.0. This function evaluates the a₁ vector contained in thefirst argument against the scenario contained in the second argument.Initially, an aaMatrix object is created and column aaMatrix.aa[][1] isloaded with the first-stage allocation vector (xAlloc.a1). Afterwards,stages two to nStage are iteratively re-optimized. During eachiteration, the DeterministicOptimizer function is called with threearguments: iFlexStage is the starting stage for which allocations can bere-optimized; aaMatrix contains fixed allocations made prior to stageiFlexStage; and wwMatrix is the GBS for the iFlexStage stage ofwScenario. The function finishes by passing voa to the first argument.

FIG. 10 outlines the DeterministicOptimizer function, which takes thethree arguments just described. Assuming that the scenario defined inwwMatrix occurs with certainty and holding the allocations in aaMatrixprior to stage iFlexStage fixed, this routine applies standardstate-of-the-art techniques to optimize allocations for stagesiFlexStage through nStage. The first step is to evaluate and respond towhat transpired up until the start of the iFlexStage. This could entailallocating resources to handle already incurred obligations, and couldentail determining resource quantities that are available as of theiFlexStage stage. The second step is to look forward and optimizeallocations for stages iFlexStage through nStage. This distinctionbetween a first and second step is really artificial, since what issought is a re-optimization of resource allocations: Given the portrayedsituation, determine the optimal resource allocations for stagesiFlexStage through nStage. This optimization process might entailapplications of “if . . . then . . . ” logic, “rules-of-thumb,”heuristics, expert-system-like computer code, OR/MS optimizationtechniques, or any other data-process or optimization technique thathelps to optimize resource allocations. Further, the flow through theroutine might be contingent upon fixed-earlier-stage allocation(s)(aaMatrix), stage (iFlexStage), and/or GBS (wwMatrix); for any givenfunction execution, multiple and on-the-fly creations/customizations ofoptimization models might occur and, between uses of such models, datamanipulated. Here the word “optimization” and conjugates are usedloosely, since true global optimization is not necessary. What isnecessary is to develop an allocation for stages iFlexStage and beyond.A simple reasonable allocation, assuming the same result for the sameiFlexStage, aaMatrix, and wwMatrix combination, would suffice.Obviously, though, the better the optimization, the better the finalallocation. This function finishes by setting columns iFlexStage,iFlexStage+1, . . . , nStage of aaMatrix.aa equal to the optimizedallocations for stages iFlexStage, iFlexStage+1, . . . , nStage,respectively; and calling the ValueAllocation function to set the voavalue.

A major advantage of the present invention is that stochasticresource-allocation optimization can be done using a deterministicperspective in the DeterministicOptimizer function. Deterministicresource-allocation optimization is better understood, more advanced,and simpler than prior-art stochastic optimization. (ThoughDeterministicOptimizer function allows a deterministic perspective, sucha perspective is not required. Hence, when a human expert definesDeterministicOptimizer functionality, it is acceptable to implicitlyconsider uncertainty.)

The ValueAllocation function, shown in FIG. 11, jointly assesses ascenario and an allocation to determine a voa value. This valuerepresents the desirability to have the scenario-allocation pair occur,as opposed to having any other scenario-allocation pair occur. Thiscould entail, for example, setting voa equal to:

the objective function value realized by the DeterministicOptimizer orthe NativeOptimizer functions

the cash balance at the end of the last stage

the present-value of the stages' cash-flow stream

a VNM utility value based upon the monetary value at the end of the laststage

an aggregation of VNM utility values based upon monetary values atdifferent stages

a non-VNM utility functional value

Philosophically, the ValueAllocation function interprets and convertsthe results of an optimization into units of one of the threefundamental objectives: monetary gain, monetary loss, or utility.

An advantage of the present invention is to permit the NativeOptimizerand the DeterministicOptimizer functions to use undefined orexpedient-optimization objectives and have the ValueAllocation functioninterpret and value the results, so that optimal allocations can be madein the presence of uncertainty.

FIG. 12 shows the skeletal definition of the ZCluster class. ThewScenarioCntn member contains wScenario objects belonging to thecluster. The first-stage allocations that perform best for the clusterare stored as xAlloc objects in xAllocBestCntn; the optimal first-stageallocation is also stored in xAllocOpt. The function XAllocEvaluatorevaluates first-stage allocation xAlloc across all scenarios within thecluster; the ConsiderAppendBestXAlloc function manages xAllocBestCntn.The Improver function finds better first-stage allocations by using theSimpleParabolaSearch, InnerCompressSearch, and OuterCompressSearchfunctions. These functions in turn use several XAlloc instances: xAlloc0and xAlloc1 are two good allocations used to find better allocations(and correspond to points 300 and 301 of FIG. 3A.); xAlloch is theresult of merging allocations xAlloc0 and xAlloc1; xAlloc0off is anoffset from xAlloc0 (and corresponds to point 304 of FIG. 3B); xAllocBndis used by InnerCompressSearch to close-in on a better allocation (andcorresponds to point 303 of FIG. 3B). Function GenxAlloch generates andevaluates xAlloch; variable wasImproved is a Boolean indicating whetherGenxAlloch yielded an overall better first-stage allocation. VariablexAllocHurdle is an allocation to be surpassed in an iteration ofImprover.

In Step 101, prior-art techniques are used to create scenarios and builda scenario tree, like that shown in combined FIGS. 4A and 4B, with wNodeand wScenario objects. Scenario creation could be done by a human expertand/or by computer generation. Each scenario consists of a realizationof exogenously-determined random variables. Scenarios may includeexogenous changes to resource levels that occur during one or more ofthe stages. So, for example, a particular stage of each scenario mayhave a variable representing the realization of a contingent financialliability; such a realization changes available cash, and theoptimizations/allocations are done assuming that available cash isappropriately reduced at the particular stage. (This does not rule outallowing insurance to be purchased in an earlier stage in order tooffset the contingent-liability realization.)

If it is possible to obtain or calculate estimates of scenarioprobabilities, then such estimated values should be indicated innativeProbability; if such estimates are not available, then allwScenario.nativeProbability values should be set to the inverse of thenumber of generated scenarios. After scenario creation, for eachwScenario object, the NativeOptimizer function is called to optimizeallocations for all stages within the scenario, assuming the scenariooccurs with certainty. NativeOptimizer in turn calls ValueAllocation toproperly determine voa. The resulting first-stage allocation is storedin nativeXAlloc, along with voa. If, in a given wScenario instance,there are multiple-globally-optimal first-stage allocations and they caneasily be identified, then one should be randomly selected for storagein nativeXAlloc. (Programmatically, NativeOptimizer might call theDeterministicOptimizer function with a 1 value for iFlexStage, an emptyaaMatrix, and the wScenario's wwMatrix.)

In Step 103, using the first-stage allocations contained innativeXAlloc.a1 as coordinates, the wScenario objects are clustered(many prior-art clustering techniques are available). Clustering doesnot need to be academically pure: for instance, ordinal numeric valuescould be treated as if they were interval numeric values, some“difficult” fields ignored, etc. The value of nativeXAlloc.voa couldalso be used, though it is not necessary. A cluster may have one or morewScenario objects. Prior to clustering, vectors nativeXAlloc.a1 shouldtemporally be normalized, so that some dimensions do not dominate theclustering process. For each identified cluster, instances of theZCluster class are created and wScenarioCntn member is loaded with thewScenario objects belonging to the identified cluster.

In Step 105, where Guiding Beacon Scenarios are generated, the firstoperation is to set the pGBS member of each the last-stage wNode equalto the instance's member pWScenario. Next, all xAllocRndCntn containersin all wNode objects are emptied. Afterwards, the nativeXAlloc objectsof all wScenario objects are weighted by nativeProbability, are randomlyselected, and are loaded into the xAllocRndCntn containers of the secondthrough nStage−1 nodes. (When there are only two stages, this Step 105should be skipped.) Each such xAllocRndCntn container needs to be loadedwith at least one nativeXAlloc; the same nativeXAlloc may be loaded intomultiple xAllocRndCntn containers. The GBSs for stages two throughnStage−1 are generated by:

AAMatrix aaMatrix;

for(iStage=nStage−1; 2 <= iStage; iStage--)

for(iNode=each iStage stage node)

{

for(jNode=each iStage+1 stage node that follows iNode)

{

jNode.voa=0;

for(kxAlloc=each xAlloc contained in xAllocRndCntn of iNode)

{

copy vector a1 of kxAlloc to column-vector aaMatrix.aa[][1];

DeterministicOptimizer(2, aaMatrix, jNode.pGBS→wwMatrix);

jNode.voa=jNode.voa+aaMatrix.voa*jNode.nodeProbability;

for(lNode=each iStage+1 stage node that follows iNode and is not equaljNode)

 {

 DeterministicOptimizer(iStage+1, aaMatrix,

  lNode.pGBS→wwMatrix);

 jNode.voa=jNode.voa+aaMatrix.voa*

  lNode.nodeProbability;

 }

}

Set jNode=the iStage+1 node that follows iNode and has the highest voa;

iNode.pGBS=jNode.pGBS;

}

In Step 107, identifying the best allocations within the clustersentails:

for each cluster

{

clear xAllocBestCntn;

xAllocOpt.voa=negative infinity;

for(iwScenario=each wScenario contained in wScenarioCntn)

XAllocEvaluator(iwScenario.nativeXAlloc, TRUE);

}

The called XAllocEvaluator function member of the ZCluster class is:

ZCluster::XAllocEvaluator(xAlloc, OKadd)

{

VOA voa;

voa=0;

for(iwScenario=each wScenario in wScenarioCntn)

{

EvaluateXAllocAgainstWScenario(xAlloc, iwScenario);

voa=voa+xAlloc.voa*iwScenario.nativeProbability;

}

xAlloc.voa=voa;

//after the above first loop, the following is performed:

if(xAllocOpt.voa<xAlloc.voa)

{

xAllocOpt=xAlloc;

}

if(xAllocHurdle.voa<xAlloc.voa)

{

xAllocHurdle=xAlloc;

wasImproved=TRUE;

}

if(OKadd)

{

XAlloc xAllocDel;

xAllocDel=xAlloc in xAllocBestCntn with lowest voa;

ConsiderAppendBestXAlloc(xAlloc, xAllocDel);

}

}

ZCluster::ConsiderAppendBestXAlloc(xAllocAdd, xAllocDel)

{

if(xAllocAdd not in xAllocBestCntn)^(#)

# Using the comparison operator of the XAlloc class. The purpose here isto prevent xAllocBestCntn from being flooded with roughly equivalentallocations.

{

if(xAllocBestCntn.IsFull())

{

if(xAllocDel.voa<xAllocAdd.voa)

{

remove xAllocDel from xAllocBestCntn;

add xAllocAdd to xAllocBestCntn;

}

}

else

add xAllocAdd to xAllocBestCntn;

}

else

{

find i such that xAllocBestCntn[i] equals xAllocAdd andxAllocBestCntn[i].voa is minimized;

if(xAllocBestCntn[i].voa<xAllocAdd.voa)

xAllocBestCntn[i]=xAllocAdd;

}

}

Step 109 entails:

for each cluster

Improver();

Cluster member function Improver entails:

Improver()

{

Perform the following, one or more times:

xAllocOpt.h=0;

xAlloc0=xAllocOpt;

Randomly select an xAlloc object from xAllocBestCntn that has notpreviously been paired with (within current zCluster instance), and isdifferent from, the current xAllocOpt.

xAlloc1=randomly selected xAlloc;

xAlloc1.h=1;

xAllocHurdle=xAlloc1;

xAllocBnd=xAlloc1;

wasImproved=false;

SimpleParabolaSearch();

if(!wasImproved)

InnerCompressSearch();

if(!wasImproved)

OuterCompressSearch();

if(wasImproved)

ConsiderAppendBestXAlloc(xAllocHurdle, xAlloc1);

}

The SimpleParabolaSearch function uses the parameter h, which can rangefrom negative to positive infinity. The preferred values are between 0and 1, with a slight extra preference for the value to be less than 0.5,presuming xAlloc0.voa is better than xAlloc1.voa. Pseudo-code follows:

ZCluster::SimpleParabolaSearch()

{

Do the following, one or more times, each time with a different h value:

{

GenxAlloch(h);

if(0<xAlloch.h<xAllocBnd.h)

xAllocBnd=xAlloch;

if(wasImproved)

{

Determine the parabola passing through the following three points(wherethe first coordinate is the domain and the second coordinate the range):

(0, xAlloc0.voa),

(h, xAlloch.voa),

(1, xAlloc1.voa);

if(such a parabola exists and has a maximal value)

{

Set h2 equal to the domain value that yields the maximal value;

GenxAlloch(h2);

}

if(0<xAlloch.h<xAllocBnd.h)

xAllocBnd=xAlloch;

exit function;

}

}

}

The GenxAlloch function, with its h argument, follows:

ZCluster::GenxAlloch(h)

{

for(i=0;i<number of elements in vector a1; i++)

if(a1[i] is interval or ratio numeric)

{

xAlloch.a1[i]=(1−h)*xAlloc0.a1[i]+(h)*xAlloc1.a1[i];

if(xAlloch.a1[i] should be discrete)

round xAlloch.a1[i] to be discrete;

if(xAlloch.a1[i] is necessarily out of bounds)

bring xAlloch.a1[i] within bounds;

}

else if(a1[i] is an ordinal numeric)

{

set xAlloch.a1[i] equal the ordinal value that is closest to/mostassociated with:

(1−h)*xAlloc0.a1[i]+(h)*xAlloc1.a1[i];

}

else

{

if(h<=0.5)

xAlloch.a1[i]=xAlloc0.a1[i];

else

xAlloch.a1[i]=xAlloc1.a1[i];

}

//after the above first loop, the following is performed:

xAlloch.h=h;

if(xAlloch.a1 is feasible)

{

XAllocEvaluator(xAlloch, FALSE);

xAlloch.feasible=TRUE;

}

else

{

dis=minimum(abs(h), abs(h−1));

xAlloch.voa=(lowest voa contained in xAllocBestCntn's xAllocobjects)−(positive constant)*dis*dis;

xAlloch.feasible=FALSE;

}

}

Two approaches to “infeasible” first-stage allocations can be used. Thefirst is simply to work with it; namely, have DeterministicOptimizerdetermine the result of attempting to implement such first-stageallocations. The second approach, which is shown above and ispreferable, is to generate a penalty for non-feasibility. The penaltymechanism results in the allocation never being accepted, but is inkeeping with the search techniques and allows processing to continuesmoothly. (Note that infeasibility discussed in this paragraph is forfirst-stage allocations. Such allocations might result in“infeasibility” in subsequent stages, but as discussed previously,constraints can always be violated, though with consequences. Part ofthe purpose of the DeterministicOptimizer function is to evaluate, andwork with, such consequences.)

The InnerCompressSearch function uses a parameter h3. This parameterneeds to be between zero and xAllocBnd.h, such that the GenxAllochfunction generates an xAlloch that is near, but not equal to, xAlloc0.

ZCluster::InnerCompressSearch()

{

GenxAlloch(h3);

xAlloc0off=xAlloch;

if(xAlloc0.voa<xAlloc0off.voa)

{

do one or more times:

{

Determine the parabola passing through the following three points:

(0, xAlloc0.voa),

(xAlloc0off.h, xAlloc0off.voa),

(xAllocBnd.h, xAllocBnd.voa);

if(such a parabola exists and has a maximal value)

{

Set h4 equal to the domain value of the parabola that yields the maximalrange value;

if(h4 between 0 and xAllocBnd.h)

 {

 GenxAlloch(h4);

 xAllocBnd=xAlloch;

 }

else

 exit function;

}

else

{

exit function;

}

}

}

}

The OuterCompressSearch function uses a parameter hDec that can be anypositive value.

ZCluster::OuterCompressSearch()

{

XAlloc trailxAlloc1, trailxAllocm, trailxAllocr;

XAlloc org0, org1;

trailxAllocm=xAlloc0;

trailxAllocr=xAlloc1;

org0=xAlloc0;

org1=xAlloc1;

h5=0;

do one or more times:

{

h5=h5−hDec;

GenxAlloch(h5);

if(trailxAllocm.voa<xAlloch.voa)

{

trailxAllocr=trailxAllocm;

trailxAllocm=xAlloch;

}

else

{

trailxAlloc1=xAlloch;

if(trailxAlloc1.feasible)

{

Determine the parabola passing through the following three points:

 (trailxAlloc1.h, trailxAlloc1.voa),

 (trailxAllocm.h, trailxAllocm.voa),

 (trailxAllocr.h, trailxAllocr.voa);

if(such a parabola exists and has a maximal value)

 {

 Set h5 equal to the domain value of the parabola that yields themaximal range value;

 GenxAlloch(h5);

 if(trailxAllocm.h<xAllocOpt.h)

 trailxAlloc1=trailxAllocm;

 }

}

xAlloc0=xAllocOpt;

xAlloc1=trailxAlloc1;

xAllocBnd=xAlloc1;

xAllocBnd.h=1;

InnerCompressSearch();

if(InnerCompressSearch improved xAllocHurdle)

{

xAllocHurdle.h=xAlloc0.h−(xAlloc0.h−xAlloc1.h)*xAllocHurdle.h;

}

xAlloc0=org0;

xAlloc1=org1;

exit function;

}

}

}

If there is more than one cluster remaining, Step 113 is performed afterStep 109. Similar to Step 103, using the zCluster's vector xAllocOpt.a1as coordinates, the clusters are clustered into new larger clusters. Foreach identified new larger cluster:

create zCluster instance newZCluster;

for(each old cluster being merged into newZCluster)

add each wScenario in oldZCluster.wScenarioCntn tonewZCluster.wScenarioCntn;

for(each old cluster being merged into newZCluster)

{

for(xAllocPrev=each xAlloc in oldZCluster.xAllocBestCntn)

newZCluster.XAllocEvaluator(xAllocPrev, TRUE);

destroy oldZCluster;

}

After the clusters have been merged, processing resumes at Step 109.

If there is only one cluster remaining, Step 115 is performed after Step109. It entails implementing the first-stage resource allocationsindicated in vector xAllocOpt.a1 of the last remaining zCluster. Thisvector, xAllocOpt.al, of the last remaining zCluster contains what istermed the Optimal Final Allocation. (After implementation and thesubsequent actual realization of w₁, the complete process described hereis repeated, with the second stage having become the first stage, thethird stage having become the second, and so forth.)

Miscellaneous Considerations

Functions ZCluster::XAllocEvaluator (of each ZCluster instance),EvaluateXAllocAgainstWScenario, and DeterministicOptimizer should avoidrepeating lengthy calculations when given the same arguments. This canbe accomplished by the following: at the end of each function call, thearguments and results are stored; at the start of each function call, ifthe same arguments are being used again, then the associated previousresults are retrieved.

Further along these lines, if the NativeOptimizer and/orDeterministicOptimizer functions generate difficult-to-reproduceintermediate results that could be used for re-optimization, then suchresults should be saved for reuse.

Example Resource Allocations

The following examples are presented here to demonstrate some of theuses, usefulness, and scope of the present invention. These examples aremeant to be illustrative, and should not be construed to define or boundthe present invention.

EXAMPLE 1 Designing a New Manufacturing Facility with Uncertain FutureDemand

Capacity requirements for a new manufacturing facility are needed, butit is uncertain what they should be, because future product demand isuncertain and seasonal.

A five-stage resource-allocation optimization is appropriate here. Thefirst stage concerns determining capacity levels or investments, and thesecond through the fifth stages concern allocating that capacity to meetseasonal demand. Scenarios are generated and a scenario-tree isconstructed. The NativeOptimizer function member of each wScenarioobject determines optimal capacity, assuming the scenario'sproduct-demand level (specified in wwMatrix) occurs with certainty.NativeOptimizer may entail use of expert-knowledge, may entail use ofOR/MS optimization techniques, or may determine capacity in a crude andlax manner. NativeOptimizer calls ValueAllocation to compute ROI (returnon investment) based upon first-stage capacity investments and thereturn during the four seasons.

Based upon first-stage capacity levels, the wScenarios are clusteredinto zCluster objects. WNode.xAllocRndCntn objects are loaded withwScenario.nativeXAlloc objects, and the GBSs are generated. Bestfirst-stage capacity levels are identified and improved upon.

The DeterministicOptimizer function optimizes allocations for meetingseasonal demand, which correspond to stages two through five. Thecapacity allocations for stages iFlexStage through stage 5 arere-optimized, holding both first-stage capacity levels and allocationsfor stages two through iFlexStage−1 fixed. The function concludes bycalling ValueAllocation to determine the ROI based upon first-stagecapacity levels and the return during the four seasons. (In this case,the DeterministicOptimizer function is very different from theNativeOptimizer function, because the latter addresses optimizingcapacity levels, given fixed demand—while the former addressesoptimizing fixed-capacity allocations to best meet demand.)

Afterwards, the ZCluster::Improver function is executed for eachinstance and the zClusters are merged. The process repeats until only asingle zCluster remains. This zCluster's xAllocOpt contains the optimalcapacity levels for the new manufacturing facility.

EXAMPLE 2 Cash Management with Uncertain Receipts and Uncertain Payouts

Corporate treasurers typically manage cash in order to meet cashrequirements and to maximize return. Both future requirements and futurereturns are frequently uncertain, and this invention can help optimizein the presence of such uncertainty.

The first step is to generate scenarios. Each stage of each scenario(i.e., each w vector) has the following:

A) for each existing and possible-future investment:

cash requirements

cash receipts

acquisition price

divestiture price

B) contingent realizations of:

extra cash requirements

extra cash receipts

C) status data concerning:

interest rates

stock market conditions.

After the scenarios are generated, they are loaded into thescenario-tree and wScenario objects and, for each wScenario, theNativeOptimizer function is executed. In this case, the NativeOptimizerfunction can call DeterministicOptimizer, with iFlexStage equal to one.

The DeterministicOptimizer optimizes cash management, given adeterministic situation. It may initially determine available cash foreach stage and, as is possible, allocate such cash to the individualstages' cash requirements. If extra cash is available in various stages,such cash is optimally invested with consideration of definitely-known(i.e., certain) subsequent-stage requirements, rates of return, andtransaction costs. If cash is short, then investments are optimallyliquidated in various stages with consideration of definitely-knownsubsequent-stage requirements, rates of return, and transaction costs.And finally, the investments themselves are juggled with considerationof definitely-known subsequent-stage rates of return and transactioncosts. Corporate policy may dictate certain constraints and, ifpossible, such constraints should be respected. (The variety ofapproaches here is innumerable, and this is but one approach.)

The DeterministicOptimizer function in this case could, and possiblyshould, entertain that which is usually considered unthinkable:defaulting on bonds, missing payroll, etc. In a given execution of thisfunction, the allocations for stages iFlexStage and beyond couldinitially result in certain catastrophes, for example: defaulting onbond obligations and missing payroll starting in stage iFlexStage+3. Theoptimization process might improve the matter by changing theallocations of stage iFlexStage and beyond. This might result, forexample, in meeting payroll in stage iFlexStage+3, and suffering amore-serious default in stage iFlexStage+4. (Clearly, making the best ofthe situation, i.e., optimization, entails ethical judgments, survivalconsiderations, and trade-offs.)

The ValueAllocation function might return the present-value of the gainsand losses occurring in each stage. Alternatively, it might return thesum of VNM utilities resulting from the gains and losses occurring ineach stage.

Processing proceeds as previously described until there is one remainingzCluster, with its xAllocOpt.a1 allocation (Optimal Final Allocation)that indicates the cash allocations that should be made in the firststage.

EXAMPLE 3 Optimizing a Financial Portfolio with Uncertain Future Returns

An investor owns various financial instruments (FIs), cash, stocks,bonds, derivatives (options), commercial paper, etc. The investor wantsto maximize the VNM-utility portfolio-value as of a year from now.

Scenarios are generated using state-of-the-art techniques. For each FIthat is or may be owned, twelve monthly prices and returns are includedin each scenario.

After the scenarios are generated, they are loaded into thescenario-tree and wScenario objects, and the NativeOptimizer function isexecuted. In this case, the NativeOptimizer function can callDeterministicOptimizer, with iFlexStage set equal to one.

The DeterministicOptimizer optimizes the purchases and sales of FIs,assuming the scenario occurs with certainty. This optimization mayconsider tax effects, transaction costs, discrete-block-size transactingrequirements, etc. When first-stage allocations are optimized (i.e.,iFlexStage=1) and if multiple first-stage allocations yield the samereturns, then a random process is used to select a first-stageallocation from among the optimal first-stage allocations.

The ValueAllocation function notes the value of the portfolio at the endof the year, and converts the portfolio's monetary value into a VNMutility value. The VNM function can be specified by the investor using aseries of connected points that map portfolio-monetary value to utility.

Processing proceeds as previously described until there is one remainingzCluster, with its xAllocOpt.al allocation (Optimal Final Allocation)that indicates which FIs the investor should presently own. Differenceswith actual present ownership are resolved by buying and selling FIs.

EXAMPLE 4 Portfolio Replication with Uncertain Coupling

Some investment institutions need to replicate a portfolio, but cannotobtain the portfolio's individual financial instruments (FIs). Instead,other FIs are purchased to compose an imitation portfolio (IP) that isexpected to perform like the genuine portfolio (GP).

Such mimicry can be optimized with the present invention in an manneranalogous to the portfolio example immediately above. Here, onlyfirst-stage allocations (a₁) that are expected to optimally endure asingle realization of random events (w₁) are required. Scenarios aregenerated using state-of-the-art techniques. Each scenario comprisessingle-period performance samples for each of the GP's FIs, and for eachof the FIs that can be used in the IP.

After the scenarios are created and loaded into the scenario-tree andwScenario objects, the NativeOptimizer function allocates cash to theFIs that can be used in the IP, such that the return of the IP equalsthe return of the GP contained in the wScenario object. It is likelythat multiple allocations can yield the same return, and so a randomprocess selects one such allocation.

In this example, the DeterministicOptimizer does nothing other than callthe ValueAllocation function. ValueAllocation initially determines thedifference between the performance of the GP and the IP. A special VNMutility function, like those shown in FIGS. 13A and 13B, is used toconvert the performance difference into a utility or a voa value. Inother words, the domain of these special VNM utilities functions is thedifference (positive or negative) between the return of the IP and thereturn of the GP. (The utility function in 13A dictates seeking a strictparallel performance between the GP and the IP; while the function in13B suggests wanting a performance roughly equivalent to the GP, thoughwith a willingness to seek superior returns with the concomitant riskthat inferior returns will result.)

Processing proceeds as previously described until there is one remainingzCluster, with its xAllocOpt.al allocation (Optimal Final Allocation)that specifies the FIs' quantities that should be owned to mimic the GP.

EXAMPLE 5 Allocating Organizational Resources in an UncertainEnvironment

One of the more advanced methods for allocating resources is presentedin the PRPA. Because that method sometimes uses Simple-scenario analysis(as described earlier herein) for allocating and pricing resources in anuncertain environment, those allocations might be sub-optimal. Thepresent invention, however, can be coupled with the PRPA to makesuperior allocations.

In this example, uncertainty is presumed present in resource prices,product prices, potential demands, production coefficients,allocation-to-effectiveness-function specifications, and resourcequantities. This example has three stages or time periods. At least someof the groups/Apertures cross stages; hence their allocations affectmultiple periods.

The first step is to generate scenarios by randomly sampling foruncertain values. The generated scenarios are loaded into thescenario-tree and wScenario objects. NativeOptimizer function optimizesallocations, as described in the PRPA.

The ValueAllocation function determines the present-value of the changesin WI_Cash (or Internal Producer's Surplus) during each time period(stage).

The DeterministicOptimizer function performs optimizations holdingfirst-stage, or first-and second-stage allocations fixed. Each executionentails (given the previous allocations and the fixed scenarios)determining available WI_Cash, subtracting out earlier-stage consumedresources, holding prior-stage group and non-group allocations fixed,and then re-optimizing.

Processing proceeds as previously described until only one zClusterremains. Its xAllocOpt.a1 allocations are the a₁ allocations to beinitially implemented.

Conclusion

As the reader who is familiar with the domain of the present inventioncan see, this invention thus leads to optimized, or near-optimized,resource allocations when uncertainty is present. With suchoptimizations, both organizations and individuals can therefore betterreach their goals.

While the above description contains many particulars, these should notbe construed as limitations on the scope of the present invention; butrather, as an exemplification of one preferred embodiment thereof. Asthe reader who is skilled in the invention's domain will appreciate, theinvention's description here is oriented towards facilitating ease ofcomprehension. Such a reader will also appreciate that the invention'scomputational performance can easily be improved by applying bothprior-art techniques and readily apparent improvements.

Many variations and many add-ons to the preferred embodiment arepossible. Their use frequently entails a trade-off betweenrequired-computer time and final-allocation quality, and theireffectiveness can be situationally contingent. Examples of variationsand add-ons include, without limitation:

1. The Improver function does not necessarily need to use xAllocOpt forxAlloc0. Instead, two different xAllocs from xAllocBestCntn could berandomly selected and copied to xAlloc0 and xAlloc1, preferably withxAlloc0.voa being superior to xAlloc1.voa. The random selection processshould avoid repeated selection of the same pair in the same zClusterinstance. Once clusters are merged, continuing to avoid repeating a pairmight be desirable, since this would tend to focus searching in thespace between the previous-smaller-merged clusters.

2. The Improver function can skip any or all of the three searchfunctions (SPS, ICS, OCS). Omission results in obtaining a finalallocation faster, though it is likely be inferior to what could haveotherwise been obtained. (OCS is likely the least computationallyefficient of the three functions.)

3. A further variation on variation #2 is to selectively use theImprover function. If, a priori, a single local optimum can be assumedfor the z function, then performance could be improved as follows. AfterStep 105 clusters, here termed Modal-clusters, that may contain theoptimal allocations are identified: clusters that have many scenariosand/or clusters that have scenarios with particularly high voa valuesare good Modal-clusters choices; clusters that would contain first-stageallocations as determined by Simple-scenario analysis and/orConvergent-scenario analysis are also good choices. After one or moreModal-clusters are identified, processing proceeds as previouslydescribed, except that 1) in Step 109, the Improver function is appliedonly to the Modal-clusters, and 2) in Step 113, when clusters aremerged, if an old non-Modal zCluster object yields a superior xAlloc forthe new zCluster object, then the old zCluster object's Improverfunction is immediately called, and the merging postponed until afterthe function is complete. (The result of merging a Modal withnon-Modal-cluster(s) is a Modal-cluster.)

An extreme use of Modal-clusters entails, in Step 103, using anallocation resulting from Simple-scenario analysis as a seed to build aModal-cluster having more than one wScenario objects. Afterwards, eachwScenario object not included in the Modal-cluster is loaded into itsown zCluster object (singleton). Then in each iteration of Step 113,only the singleton clusters relatively near the Modal-cluster are mergedinto the Modal-cluster, while the singletons relatively far from theModal-cluster are not merged until a subsequent iteration of Step 113.

4. Standard line-search, non-derivative, and/or derivative basedtechniques could be incorporated in ZCluster::Improver for improvingfirst-stage allocations (stored as xAlloc objects in xAllocBestCntn).Such techniques might require some adaptation, including, for instance,incorporation of response surface methods (RSM techniques). (See A. R.Conn, K. Scheinberg, and Ph. L. Toint “Recent Progress in UnconstrainedNonlinear Optimization Without Derivatives” Mathematical Programming 79(1997), p. 397-414; and M. S. Bazaraa, H. D. Sherali, C. M. Shetty,Nonlinear Programming Theory and Algorithms 2nd ed., John Wiley & Sons.Inc., New York, 1993, [See particularly Chapter 8: “UnconstrainedOptimization” p. 265-355]. Both references also cite relevant previouspublications.) Incorporation of such standard line-search,non-derivative, and/or derivative based techniques in ZCluster::Improverwill be termed here as StandardSearch.

An example of StandardSearch is the use of the sequential simplex searchtechnique developed by Nelder and Mead: some or all of the xAllocobjects stored in xAllocBestCntn could be used to define the simplex,which is in turn used to generate additional xAlloc objects (in a manneranalogous with the GenxAlloch function), which in turn are evaluatedusing XAllocEvaluator, which in turn redefine the simplex, etc.—allpotentially leading to a superior xAlloc.

5. Well known genetic algorithms could be incorporated into theZCluster::Improver function to combine existing xAlloc objects inxAllocBestCntn to form additional xAlloc objects, which are evaluatedusing XAllocEvaluator. Naturally, the better resulting xAlloc objectsare added to xAllocBestCntn. Incorporation of genetic algorithms inZCluster::Improver will be termed here as GeneticSearch.

A simple means to implement GeneticSearch is to include in the Improverfunction calls to a special version of GenxAlloch. This special versionwould be identical to the regular version, except that a different valuefor h would be randomly generated for each iteration of the first loop.

6. The equality-comparison operator of the XAlloc class could initiallystart with a loose tolerance, and as processing proceeds, becometighter. This might reduce potentially wasteful considerations ofroughly-equal allocations, when there are numerous xAllocs in numerouszClusters.

7. If there are many scenarios in a cluster, theZCluster::XAllocEvaluator function could use statistical inference toconsider early termination. If statistical inference suggests that theresulting voa would not be very good, then xAlloc.voa should be set tothe estimated not-very-good value, the function exited, and processingotherwise continued. (The drawn-sample-scenario sequence should beconsistent.)

8. If there are many wScenario objects, then initial clustering could benested: clusters are initially formed based upon a₁ allocations, thenwithin each such cluster, another secondary clustering is done basedupon a₂ allocations, and so forth. The final (smallest) clusters wouldthen be loaded into the zCluster objects.

9. The maximum number of xAlloc objects held in ZCluster::xAllocBestCntncould be variable, and thus the thoroughness of the optimizationadjusted. The Improver function, and the functions it calls, arecontinuously generating reasonable xAllocs that could be saved inxAllocBestCntn. Alternatively, after each iteration of the Improverfunction, xAlloc0 and/or xAlloc1 could be removed from xAllocBestCntn ifthey do not equal is xAllocOpt. Further, periodically the xAlloc objectsin ZCluster::xAllocBestCntn could be evaluated for equivalence, andrough duplicates discarded.

10. Scenario specifications, i.e., wScenario.wwMatrix, could be used asproxies for clustering based upon first-stage allocations. When scenariogeneration is performed by using formal sampling techniques, i.e., areasampling, cluster sampling, stratified sampling, systematic sampling,etc., clusters frequently automatically suggest themselves. Suchnaturally occurring clusters can be used as bases for initially loadingthe zCluster objects.

11. Within each zCluster instance, any means can be used to createfirst-stage allocations (xAlloc objects), which then could be evaluatedby the XAllocEvaluator function. Techniques for creating first-stageallocations include: generating a weighted average of the native XAllocscontained in wScenarioCntn, and generating a weighted average of thexAllocs contained in xAllocBestCntn. Any xAlloc created outside of azCluster instance could also be used. Incorporation of such methods willbe termed here as MiscSearch.

12. When multiple processors are available, they might desirably be usedfor parallel execution of multiple instances of theZCluster::NativeOptimizer and the ZCluster::Improver functions and forparallel generation of GBSs. The generation of GBSs could be done byhaving each processor handle a branch of the scenario tree.

13. The GBSs can be regenerated at any time, which beneficiallycalibrates the GBSs to the current-optimization state. This requires: 1)weighting each cluster by the cumulative probability that the scenarioswithin the cluster will occur, 2) randomly assigning, based upon clusterprobability, the clusters' xAllocOpt (or the xAllocs stored in theclusters' xAllocBestCntn) to the wNodes' xAllocRndCntn objects, and 3)proceeding with GBS generation as previously described.

14. Contingent-GBSs could result in better allocations, but require moreeffort to generate. Contingent-GBSs are particularly appropriate whenearlier stage allocations make a significant difference for the laterstages. For example, a household's resource allocation is beingoptimized; a decision to buy or not buy a first home significantlyaffects what can be done in subsequent stages. To generateContingent-GBSs, processing proceeds as previously described for eachcontingent possibility: those xAllocs in wNode.xAllocRndCntn that resultin the first variation are used to generate the first variation GBS;those that result in the second variation are used to generate thesecond variation GBS, and so forth. Returning to the example, supposeContingent-GBSs are being developed for a fifth stage node; thosexAllocs that result in purchasing-a-house in stages 1, 2, 3, or 4 areused to generate the “house bought” GBS; while those that result innot-purchasing-a-house are used to generate the “no house bought” GBS.(When optimizing stage 5 allocations, the “house bought” GBS is used ifa house is bought during stages 1, 2, 3, or 4; otherwise, the “no housebought” GBS is used.)

The difficulty with this approach is that the xAllocs in xAllocRndCntnmight not lead to every contingent variation. The simplest way aroundthis is to suspend generating the Contingent-GBS until an xAlloc thatresults in the variation appears, and then using it to generate the GBS.(Such xAllocs could be accumulated, and each time one appears, the mostrecently accumulated xAllocs used to generate new GBSs.)

15. Better GBSs can be generated by merging several scenarios to createan optimal GBS. Merged-GBSs are particularly appropriate when a branchof the scenario-tree lacks a central scenario that can serve as a goodGBS. Merged-GBSs, however, require more effort to generate.

Generating Merged-GBSs is analogous to finding optimal clusterallocations: rather than finding optimal allocations for a set ofscenarios, optimal scenarios are found for a set of allocations. Thefollowing pseudo-code shows the GenMergedGBS class, which isconceptually based upon the ZCluster class, with WWMatrix replacingXAlloc. This pseudo-code generates a Merged-GBS for an iStage-stage nodenamed iNode; execution begins at the MainBody function.

class GenMergedGBS()

{

wwMatrixBestCntn;

wwMatrixOpt;

WWMatrixEvaluator(wwMatrix, OKadd)

{

AAMatrix aaMatrix;

WWMatrix wwMatrixTemp;

wwMatrixTemp=wwMatrix;

wwMatrix.voa=0;

for(each xAlloc in iNode.xAllocRndCntn)

{

copy xAlloc.a1 to aaMatrix.aa[][1];

DeterministicOptimizer(2, aaMatrix, wwMatrixTemp);

for(jNode=each iStage+1 node following iNode)

{

DeterministicOptimizer(iStage+1, aaMatrix,

jNode.pGBS→wwMatrix);

wwMatrix.voa=wwMatrix.voa+aaMatrix.voa*jNode.nodeProbability;

}

}

// . . . Analogously follows code after first loop inZCluster::XAllocEvaluator. . .

}

ConsiderAppendBestWWMatrix(wwMatrixAdd, wwMatrixDel);

MainBody()

{

for(jNode=each iStage+1 node following iNode)

WWMatrixEvaluator(jNode.pGBS→wwMatrix, TRUE);

Improver();

iNode.pGBS=(pointer to, copy of) wwMatrixOpt;

}

Improver();

SimpleParabolaSearch();

InnerCompressSearch();

OuterCompressSearch();

GenwwMatrixh(h)

{

Analogously follows ZCluster::GenxAlloch, except first loop is appliedto all columns of wwMatrix.

}

wwMatrixHurdle;

wasImproved;

wwMatrix0;

wwMatrix0off,

wwMatrix1;

wwMatrixh;

wwMatrixBnd;

}

16. When scenarios cannot legitimately be merged, as is required forMerged-GBSs, Multiple-GBSs can be used. The central idea ofMultiple-GBSs is to use several GBSs to generate multiple allocations,which in turn are merged.

Generating Multiple-GBSs is analogous to finding optimal clusterallocations: rather than finding an optimal allocation for a set ofscenarios, an optimal blending of multiple allocations is determined andthe blending steps are noted/recorded. Later, the blending steps arerepeated for blending other allocations.

Two additional classes are required. The MAAMatrix class (meta AAMatrix)is the same as the AAMatrix class, except that it contains multiple aaarrays that are always accessed in the same order. The GenMultipleGBSclass is analogous to the ZCluster class, with MAAMatrix replacingXAlloc, and is included in each wNode object having Multiple-GBSs.

The following pseudo-code shows the process of generating Multiple-GBSsfor an iStage-stage node iNode. (For ease of comprehension, each nodeimmediately following iNode is assumed to have a single GBS, as opposedto multiple GBSs.):

MAAMatrix mAAMatrix;

AAMatrix aaMatrix;

GenMultipleGBS gmGBS;

gmGBS.nElemAAMatrixBestArray=0;

gmGBS.iStage=iStage;

gmGBS.iNode=iNode;

gmGBS.nRecorder=0;

for(jNode=each iStage+1 node following iNode)

{

empty mAAMatrix of aa arrays;

for(each xAlloc in iNode.xAllocRndCntn)

{

copy xAlloc.a1 to aaMatrix.aa[][1];

DeterministicOptimizer(2, aaMatrix, jNode.pGBS→wwMatrix);

Add aaMatrix.aa to mAAMatrix;

}

gmGBS.MAAMatrixEvaluator(mAAMatrix, TRUE);

}

gmGBS.Improver();

The GenMultipleGBS class is conceptually based upon the ZCluster class,with MAAMatrix replacing XAlloc.

class GenMultipleGBS: public . . .

{

iStage;

iNode;

struct

{

index_h0;

index_h1;

h;

index_hResult;

}recorder[];

nRecorder;

mAAMatrixBestArray[]; //analogous with xAllocBestCntn.

nElemAAMatrixBestArray;

mAAMatrixOpt;

iMax;

MAAMatrixEvaluator(mAAMatrix, OKadd)

{

mAAMatrix.voa=0;

for(jNode=each iStage+1 node following iNode)

{

for(aaMatrix=each aa array contained in mAAMatrix)

 DeterministicOptimizer(iStage+1, aaMatrix,

 jNode.pGBS→wwMatrix);

 mAAMatrix.voa=mAAMatrix.voa+aaMatrix.voa*jNode.nodeProbability;

 }

}

// . . . Analogously follows code after first loop inZCluster::XAllocEvaluator . . .

}

ConsiderAppendBestMAAMatrix(mAAMatrixAdd, mAAMatrixDel)

{

if(nElemAAMatrixBestArray==0∥

mAAMatrixBestArray[iMax].voa<mAAMatrixAdd.voa)

 imax=nElemAAMatrixBestArray;

mAAMatrixBestArray[nElemAAMatrixBestArray++]=mAAMatrixAdd;

//positions need to be kept constant and elements not

//removed, so that re-play works correctly.

}

Improver()

{

Follows ZCluster::Improver, except that when and if

ConsiderAppendBestMAAMatrix is called because an iteration yields animprovement over the beginning mAAMatrixHurdle, the following is alsodone after the call to ConsiderAppendBestMAAMatrix:

 {

 recorder[nRecorder].index_h0=i, such thatmAAMatrixBestArray[i]=mAAMatrix0;

 recorder[nRecorder].index_h1=i, such thatmAAMatrixBestArray[i]=mAAMatrix1;

 recorder[nRecorder].h=mAAMatrixHurdle.h;

 recorder[nRecorder].index_hResult=i, such thatmAAMatrixBestArray[i]=mAAMatrixHurdle;

 nRecorder++;

 }

}

SimpleParabolaSearch();

InnerCompressSearch();

OuterCompressSearch();

GenMAAMatrixh(h)

{

for(k=each aa matrix in mAAMatrix)

{

Analogously apply first loop of ZCluster::GenxAlloch to merge columns 1through iStage of kth aa array of mAAMatrix0 and mAAMatrix1 into columns1 through iStage of kth aa array of mAAMatrixh.

}

// . . . Analogously follows code after first loop inZCluster::GenxAlloch . . .

}

mAAMatrixHurdle;

wasImproved;

mAAMatrix0;

mAAMatrix0off;

mAAMatrix1;

mAAMatrixh;

mAAMatrixBnd;

}

Using Multiple-GBSs for generating the iStage-stage allocations foriNode entails not directly calling the DeterministicOptimizer functionin EvaluateXAllocAgainstWScenario, but doing the following instead:

{

aaMatrixArray[]; //i.e., array of AAMatrix objects.

i=0;

for(jNode=each iStage+1 node following iNode)

{

DeterministicOptimizer(iFlexStage, aaMatrix,

jNode.pGBS→wwMatrix);

aaMatrixArray[i++]=aaMatrix;

}

for(i=0; i<gmGBS.nRecorder; i++)

{

using:

aaMatrixArray[gmGBS.recorder[i].index_h0].aa[][iStage],

aaMatrixArray[gmGBS.recorder[i].index_h1].aa[ ][iStage],

gmGBS.recorder[i].h;

apply processing analogous to first loop of ZCluster::GenxAlloch tocreate merged values for column:

aaMatrixArray[gmGBS.recorder[i].index_hResult].aa[][iStage].

}

Copy columnaaMatrixArray[gmGBS.recorder[iMax].index_hResult].aa[][iStage] to columnaaMatrix.aa[][iStage].

}

(Note: When looping through the jNode objects, the sequence of fetchingjNode objects needs to be consistent.)

17. Besides allocating resources, this invention can also valueresources, which as previously described, can be used to allocateresources.

Define a function zz(q,c) that both uses this invention (with anunchanging scenario-tree and associated scenarios; [the GBSs, however,may change]) to determinate an optimal allocation and that returns acomputed z value for equation 2.0, given that the available on-handquantity of a particular resource changes by q, and given that availableon-hand cash changes by c. (Both q and c can apply to different stages.)Given a particular q, well known numerical techniques can be used tofind c such that:

zz(0,0)=zz(q,c)

By economic theory, the value of the |q| units of the particularresource is |c|: if q is negative, then c is the minimal value thatshould be received for selling −q resource units; if q is positive, then−c is the maximal value that should be paid for buying q resource units.For small q, |c/q| equals unit price for the particular resource andsuch a price can be used for pricing.

Another means to generate similar data is to generate supply and demandcurves. If, within the scenarios, a resource can be sold and/orpurchased, then resource supply and demand curves can be generated byvarying resource price, performing Steps 101 through 113 with the samewScenario objects, and noting the resulting resource quantity changes.(Conceptually, produced products and services can be handled as a bundleof resources. Depending on the DeterministicOptimizer andNativeOptimizer functions, the q discussed here could instead referenceproduced product and service quantities.)

Given a resource optimization method, how to value and price resourcesand how to beneficially use such values and prices is well known byeconomists. The point of this variation is that this invention can beused, as a resource optimization method, in conjunction with prior-arttechniques to determine and use resource prices and values. And oncesuch prices and values are determined, they can be used for internalpricing and for deciding whether to buy or sell on the open market.

18. Step 103 is not necessarily required, and it is acceptable, instead,to place all scenarios created in Step 101 into a single ZCluster. Thiscould be desirable when there are only a few scenarios (and henceclustering is not worth the effort) or when the clusters are highlydisparate.

From the foregoing and as mentioned above, it will be observed thatnumerous variations and modifications may be effected without departingfrom the spirit and scope of the novel concept of the invention. It isto be understood that no limitation with respect to the specific methodsand apparatus illustrated herein is intended or should be inferred. Itis, of course, intended to cover by the appended claims all suchmodifications as fall within the scope of the claims.

What I claim is:
 1. A computer system for optimally allocatingorganizational resources comprising: means for obtaining at least twoscenarios; means for obtaining at least a first-stage allocation for atleast two of said scenarios; and means for determining an Optimal FinalAllocation including: means for separately optimizing said first-stageallocations against each scenario such that said optimizing meansgenerates additional stage allocations, means for re-optimizing theadditional stage allocations against each scenario, and means forresolving infeasibilities that may occur during said means foroptimizing and said means for re-optimizing.